Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] membership_extension: support restarted memberships #191

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

yajo
Copy link
Member

@yajo yajo commented Dec 18, 2024

When a membership got cancelled and, later, restarted, we still had a cancellation date set, leading to the sensation that it was still cancelled.

With this refactor, when a cancellation date is earlier than a future start date, cancellation info is removed from the partner.

Before:
image

After:
image

BTW I improved a few things:

  • Removed old dead code that is no longer necessary in v16.
  • Fix a test that was checking what happened when a membership line was cancelled before its start date. It seems a wrong use case because memberships are only supposed to be cancelled during the membership, and not before starting it.
  • Free members need to be considered members too.
  • Migration script.

@moduon MT-8237

When a membership got cancelled and, later, restarted, we still had a cancellation date set, leading to the sensation that it was still cancelled.

With this refactor, when a cancellation date is earlier than a future start date, cancellation info is removed from the partner.

BTW I improved a few things:
- Removed old dead code that is no longer necessary in v16.
- Fix a test that was checking what happened when a membership line was cancelled before its start date. It seems a wrong use case because memberships are only supposed to be cancelled during the membership, and not before starting it.
- Free members need to be considered members too.
- Migration script.

@moduon MT-8237
@yajo yajo marked this pull request as draft December 20, 2024 11:54
Before this fix, when creating many memberships at once, only the last one was really created.

@moduon MT-8237
@yajo yajo marked this pull request as ready for review January 14, 2025 12:08
@rafaelbn rafaelbn requested a review from carmenbianca January 14, 2025 17:35
@rafaelbn rafaelbn added this to the 16.0 milestone Jan 14, 2025
@rafaelbn rafaelbn requested a review from chienandalu January 14, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants